package com.kanqiubao.kq.adapter.video;

import android.widget.ImageView;

import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.dueeeke.videocontroller.component.PrepareView;
import com.kanqiubao.kq.R;
import com.kanqiubao.kq.ThisAppApplication;
import com.kanqiubao.kq.adapter.BaseAdapter;
import com.kanqiubao.kq.bean.video.VideoListBean;

import org.jetbrains.annotations.NotNull;

/**
 * 视频列表
 */
public class VideoMainListAdapter extends BaseAdapter<VideoListBean> {
    public VideoMainListAdapter() {
        super(R.layout.video_main_list_item_layout);
        addChildClickViewIds(R.id.player_container);
        addChildClickViewIds(R.id.video_tag1);
        addChildClickViewIds(R.id.video_tag2);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, VideoListBean s) {
        PrepareView pv=baseViewHolder.getView(R.id.prepare_view);
        ThisAppApplication.loadImage(s.getFace(), (ImageView) pv.findViewById(R.id.thumb));
    }
}
